#include <iostream>
#include <unistd.h>
#include <signal.h>
using namespace std;

void my_handler(int signum)
{
    cout<<"process received signal: "<<signum<<endl;
    exit(0);
}

int main()
{
    signal(2,SIG_DFL);
    while(true)
    {
        cout<<"I am a process"<<endl;
        sleep(1);
    }
    return 0;
}

